
<?php if(validation_errors()){error(validation_errors()); }?>
<?php 
	$attrbutes = array(
		'class' => 'form-horizontal',
		'id' => 'form_edit',
		'autocomplete' => "off"
	);
	echo form_open('user/edit',$attrbutes);
?>
	<?php if($userinfo):?>
	<div class="contorl-group row">
		
	<div class="navbar navbar-inverse navbar-fixed-top bs-docs-nav">
	  <ul class="breadcrumb">
        <li><a href="#">用户管理</a> <span class="divider">></span></li>
        <li class="active">编辑用户</li>
      </ul>
	</div>
		
		<input type='hidden' name='user_id' value='<?php echo $userinfo['id']?>'>
		<div class="control-group">
              <label for='username' class="control-label"><s>*</s>用户名</label>
              <div class="controls">
				<input type="text" value="<?php echo $userinfo['username'];?>" name="username" data-rules="{required:true}"  aria-disabled="false"/>
              </div>
        </div>
		
		<div class="control-group">
              <label for='password' class="control-label"><s>*</s>更改密码</label>
              <div class="controls">
				<input type="password" id='p1' value=""  name="password" data-rules=""  aria-disabled="false"/><span class="auxiliary-text">&nbsp;&nbsp;不更改则留空</span>
              </div>
        </div>
		
		<div class="control-group">
              <label for='repassword' class="control-label"><s>*</s>重复密码</label>
              <div class="controls">
				<input type="password" value="" name="repassword"  data-rules="{equalTo:'#p1'}"aria-disabled="false"/>
              </div>
        </div>
		
		<div class="control-group">
              <label for='email' class="control-label"><s>*</s>用户邮箱</label>
              <div class="controls">
				<input type="email" name="email" value="<?php echo $userinfo['email'];?>" data-rules="{required:true,email:true}"  aria-disabled="false"/>
              </div>
        </div>
	
		
		<div class="control-group">
              <label for='username' class="control-label"><s>*</s>是否启用</label>
              <div class="controls">
				<input type="radio" name="status" value="1"  <?php if($userinfo['status'] == 1){echo 'checked="checked"';}?>> 是
                <input type="radio" name="status" <?php if($userinfo['status'] == 0){echo 'checked="checked"';}?>> 否
                
              </div>
        </div>
		
		
		<div class="actions-bar  centered">
			<input type="submit" class='button button-primary' checked="checked" value="确认修改"/>
			<input type="reset" class='button' checked="checked" value="重置"/>
		</div>
		
	</div>
	<?php endif;?>

<?php echo form_close();?>
 
<script type='text/javascript'>

var Form = BUI.Form;
new Form.Form({
	srcNode:'#form_edit'
}).render();


</script>